package com.xlh.dto.courseTest;

import com.xlh.dto.course.TemplateDataDTO;
import com.xlh.enums.LocalResourcesEnum;
import com.xlh.pojo.courseTest.ExperimentReport;
import lombok.Getter;
import lombok.Setter;

/**
 * @author zhr 2019/4/4
 */
@Getter
@Setter
public class ReportDTO extends ExperimentReport {
    // 实验报告下载路径
    private String filePath;
    // 实验报告模板下载路径
    private String modelPath;

    public ReportDTO transform(TemplateDataDTO templateInfo) {
        if (templateInfo.getFilePath() != null) this.setModelPath(templateInfo.getFilePath());
        if (this.getReportMd() == null) this.setReportMd(templateInfo.getEditContent());
        return this;
    }
}
